473,466 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript - Java list menu

1 New Member
Hi,

I am retrieving a selected item from a list/menu component on an
HTML page. The said value is passed as a parameter to a method
initiated through <jsp:useBean.


I am aware that when the user selects an item from the list/menu an
onChange event is triggered. I have handled this event by a javascript
function.


The table is populated according to the selected item, and therefore I have used the following syntax in order to populate an already defined table 'tblResults': var x=document.getElementById('tblResults').insertRow( );

Before populating each row I need to retrieve the data using the method <% outResult = result.getResult(xxx);%>, where results is the object declared by the <jsp:useBean. The xxx refers to a variable pointing to the HTML list/menu. I am able to call this method through the use of scriptlets. When I pass a value instead of xxx the process works correctly and the data is loaded into the database, however I cannot find a way of how I can pass the variable. I attempted to use

I would appreciate your kind help

Happy Christmas and thanks
Dec 24 '09 #1
2 2357
RamananKalirajan
608 Contributor
Have a input type hidden in ur html and set the value when the select is changed. You can access that input value using request.getAttribute("hidden field name ")

Thanks and Regards
Ramanan Kalirajan
Dec 28 '09 #2
acoder
16,027 Recognized Expert Moderator MVP
You're mixing up Java/JSP and JavaScript. One is server-side and one is client-side. If you want to use both without a page reload, use Ajax.
Dec 30 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
10
by: John Ortt | last post by:
Hi Everyone, I have created a Javascript menu for my site which uses frames. The first stage loads fine but I want two drill down menus ("About Me Menu" and "Projects Menu"). The pages load...
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
0
by: Phl | last post by:
hi, does any know why my javascript dropdownlist in my user control will only appear if I have my code as follows: // create an instance of the user control Control UCAdminDDMenu =...
4
by: -Lost | last post by:
I cannot for the life of me remember the site name, but I believe it was the site of one of the regular posters here or perhaps in comp.lang.java.javascript. Anyway... The site in particular...
3
by: BlueroY | last post by:
hi, I'm working on an exercise, i did a lot of work already and i just can't figure where I'm going wrong, this is what I'm trying to achieve Sample IO...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.